package pub.dsb.api.controller.user;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import pub.dsb.api.object.dto.UserInfoDTO;
import pub.dsb.framework.boot.rest.R;

@Api(value = "/v1/user", tags = {"基础信息管理"})
@RestController
@RequestMapping("/v1/user")
public class UserController {


    /**
     * 获取用户信息
     *
     * @param userId
     * @return
     */
    @RequestMapping(value = "/detail", method = RequestMethod.GET)
    @ApiOperation(value = "获取用户信息", notes = "根据用户标识获取用户信息", produces = MediaType.APPLICATION_JSON_VALUE)
    public R<UserInfoDTO> userInfo(String userId) {
        return R.ok(UserInfoDTO.builder()
                .userName("李思")
                .age(11)
                .build());
    }
}